package ua.yandex.skipass;

import java.util.Calendar;

public class HolidayPassFactory implements PassFactory {
    private Calendar releaseDate;
    private HolidayDayType dayType;

    public HolidayPassFactory(HolidayDayType dayType, Calendar releaseDate) {
        this.releaseDate = releaseDate;
        this.dayType = dayType;
    }

    public void setReleaseDateAsCurrent() {
        releaseDate = Calendar.getInstance();
    }

    @Override
    public SkiPass generateSkiPass() {
        return new HolidayPass(dayType, releaseDate);
    }
}
